package com.android.kotlin.adapter

import android.widget.ImageView
import com.android.kotlin.bean.GankBean
import com.android.kotlin.R
import com.android.kotlin.util.loadUrl2
import com.arms.mvvm.view.baseadapter.BaseQuickAdapter
import com.arms.mvvm.view.baseadapter.BaseViewHolder

/**
 * @Description:
 * @Author: xuwenlong
 * @Email: xuwenlong @ebrun.com
 * @Version:
 * @Create: 2019/2/27 0027
 * @Modify:
 */

class MyGrilAdapter(val id:Int = R.layout.item_home) :BaseQuickAdapter<GankBean.GankItemBean, BaseViewHolder>(id){


    override fun convert(helper: BaseViewHolder?, item: GankBean.GankItemBean?) {
        helper?.let {holder->
            item?.let {
               var img:ImageView= holder.getView(R.id.ivImg)
                img.loadUrl2(img.context, it?.url)
            }
        }

    }
}